#ifndef LIGHTINGDIALOG_H
#define LIGHTINGDIALOG_H

#include <QDialog>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QGraphicsPixmapItem>
#include <QGraphicsEllipseItem>

namespace Ui {
class LightingDialog;
}

class LightingDialog : public QDialog
{
    Q_OBJECT
    
public:
    explicit LightingDialog(QWidget *parent = 0);
    ~LightingDialog();

    void setPixmap(QImage image);
    void setPosSize(int width, int height);

signals:
    void parametersChanged(QPoint, int, int);
    void applyOperator(QString);
    void cancelOperator();

protected:
    void closeEvent(QCloseEvent *);
    void paintEvent(QPaintEvent *);
    void showEvent(QShowEvent *);

private slots:
    void parameterChanged(int param);
    void applyButtonClicked();
    void cancelButtonClicked();
    
private:
    Ui::LightingDialog *ui;

    QGraphicsScene* m_scene;
    QGraphicsPixmapItem* m_pixmapItem;
    QGraphicsEllipseItem* m_lightOrigin;

    double m_widthScaled;
    double m_heightScaled;
};

#endif // LIGHTINGDIALOG_H
